import service from ".";


const adminApi = {
    //分页
    selectByPage(PageNum, aname) {
        return service.get('?PageNum=' + PageNum + '&aname=' + aname);
    },
    //查询根据姓名查询
    selectAname(aname){
        return service.get('/admin/admin/ByAname', aname);
    },
    //根据ID查询
    selectAid(aid){
        return service.get(`/admin/admin/ByAid/${aid}`);
    },
    //查询所有
    selectAll(){
        return service.get('/admin/admin/All');
    },
    //新增用户
    insert(admin){
        return service.post('/admin/admin', admin);
    },
    //修改用户
    update(admin){
        return service.put('/admin/admin', admin);
    },
    //删除用户
    delete(aid){
        return service.delete(`/admin/admin/${aid}`);
    },
};
export default adminApi;